﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BLL.DTO.HelperDTO.Propiedad.GenericPropiedadDTO>" %>
<%@ Import Namespace="Resources.Presentation" %>
<div class="formContainerPopup">
    <%using (Html.BeginForm("CreatePropiedad_Submit", "Propiedades", FormMethod.Post, new { id = "formCreatePropiedad", @enctype = "multipart/form-data" }))
      { %>
    <table>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.Direccion)%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.Direccion) %>
                <%: Html.ValidationMessageFor(model => model.Direccion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.NumeroPropiedad) %>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.NumeroPropiedad) %>
                <%: Html.ValidationMessageFor(model => model.NumeroPropiedad) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.IdRegion) %>
            </td>
            <td>
                <%: Html.DropDownListFor(model => model.IdRegion, (SelectList)ViewBag.RegionList, Propiedad.DropDownListSelection, new { @onChange = "getCiudad()" })%>
                <%: Html.ValidationMessageFor(model => model.IdRegion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.IdCiudad) %>
            </td>
            <td>
                <%: Html.DropDownListFor(model => model.IdCiudad, (SelectList)ViewBag.CiudadList, Propiedad.DropDownListSelection, new { @onChange = "getComuna()" })%>
                <%:Html.ValidationMessageFor(model => model.IdCiudad) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.IdComuna) %>
            </td>
            <td>
                <%:Html.DropDownListFor(model => model.IdComuna, (SelectList)ViewBag.ComunaList, Propiedad.DropDownListSelection)%>
                <%: Html.ValidationMessageFor(model => model.IdComuna) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.Terreno) %>
            </td>
            <td>
                <%: Html.TextBoxFor(model=>model.Terreno) %>
                <%: Html.ValidationMessageFor(model => model.Terreno) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.SuperficieConstruida) %>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.SuperficieConstruida) %>
                <%:Html.ValidationMessageFor(model=>model.SuperficieConstruida) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.IdTipoPropiedad)%>
            </td>
            <td>
                <%: Html.DropDownListFor(model => model.IdTipoPropiedad, (SelectList)ViewBag.TipoPropiedadList, Propiedad.DropDownListSelection, new { @onChange = "OnChangeTipoPropiedad()" })%>
                <%: Html.ValidationMessageFor(model => model.IdTipoPropiedad) %>
            </td>
        </tr>
    </table>
    <table id="tblCasa" style="display: none">
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaEstiloCasa) %>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.CasaEstiloCasa) %>
                <%: Html.ValidationMessageFor(model => model.CasaEstiloCasa) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.CasaTipoConstruccion)%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.CasaTipoConstruccion)%>
                <%:Html.ValidationMessageFor(model => model.CasaTipoConstruccion)%>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.CasaAnoConstruccion)%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.CasaAnoConstruccion)%>
                <%: Html.ValidationMessageFor(model => model.CasaAnoConstruccion)%>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%: Html.LabelFor(model => model.CasaDescripcionLiving)%>
            </td>
            <td>
                <%: Html.TextAreaFor(model => model.CasaDescripcionLiving)%>
                <%:Html.ValidationMessageFor(model => model.CasaDescripcionLiving)%>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaDescripcionComedor)%>
            </td>
            <td>
                <%:Html.TextAreaFor(model => model.CasaDescripcionComedor)%>
                <%:Html.ValidationMessageFor(model => model.CasaDescripcionComedor)%>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaCantidadDormitorios)%>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.CasaCantidadDormitorios) %>
                <%:Html.ValidationMessageFor(model => model.CasaCantidadDormitorios) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaCantidadBanos) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.CasaCantidadBanos) %>
                <%:Html.ValidationMessageFor(model => model.CasaCantidadBanos) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaCantidadEstacionamiento) %>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.CasaCantidadEstacionamiento) %>
                <%:Html.ValidationMessageFor(model => model.CasaCantidadEstacionamiento) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaOrientacion) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model=> model.CasaOrientacion)%>
                <%:Html.ValidationMessageFor(model => model.CasaOrientacion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaDistribucion) %>
            </td>
            <td>
                <%: Html.TextAreaFor(model => model.CasaDistribucion) %>
                <%:Html.ValidationMessageFor(model => model.CasaDistribucion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.CasaDetalle) %>
            </td>
            <td>
                <%:Html.TextAreaFor(model => model.CasaDetalle) %>
                <%:Html.ValidationMessageFor(model => model.CasaDetalle) %>
            </td>
        </tr>
    </table>
    <table id="tblDepartamento" style="display: none">
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoTipoDepartamento)%>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.DptoTipoDepartamento) %>
                <%:Html.ValidationMessageFor(model => model.DptoTipoDepartamento) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoTipoConstruccion)%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.DptoTipoConstruccion) %>
                <%:Html.ValidationMessageFor(model => model.DptoTipoConstruccion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoAnoConstruccion) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.DptoAnoConstruccion) %>
                <%:Html.ValidationMessageFor(model => model.DptoAnoConstruccion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoDescripcionLiving) %>
            </td>
            <td>
                <%:Html.TextAreaFor(model => model.DptoDescripcionLiving) %>
                <%:Html.ValidationMessageFor(model => model.DptoDescripcionLiving) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoDescripcionComedor) %>
            </td>
            <td>
                <%:Html.TextAreaFor(model => model.DptoDescripcionComedor) %>
                <%:Html.ValidationMessageFor(model => model.DptoDescripcionComedor) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoCantidadDormitorios) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.DptoCantidadDormitorios) %>
                <%:Html.ValidationMessageFor(model => model.DptoCantidadDormitorios) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoCantidadBanos) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.DptoCantidadBanos) %>
                <%:Html.ValidationMessageFor(model => model.DptoCantidadBanos) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoOrientancion) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model=> model.DptoOrientancion) %>
                <%:Html.ValidationMessageFor(model=> model.DptoOrientancion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoDistribucion) %>
            </td>
            <td>
                <%:Html.TextAreaFor(model => model.DptoDistribucion) %>
                <%:Html.ValidationMessageFor(model => model.DptoDistribucion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.DptoDetalle) %>
            </td>
            <td>
                <%:Html.TextAreaFor(model => model.DptoDetalle) %><%:Html.ValidationMessageFor(model => model.DptoDetalle) %>
            </td>
        </tr>
    </table>
    <table id="tblOficina" style="display: none">
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.OficinaTipoConstruccion) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.OficinaTipoConstruccion) %>
                <%:Html.ValidationMessageFor(model => model.OficinaTipoConstruccion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.OficinaAnoConstruccion) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.OficinaAnoConstruccion) %>
                <%:Html.ValidationMessageFor(model => model.OficinaAnoConstruccion) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.OficinaCantidadBanos) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.OficinaCantidadBanos) %>
                <%:Html.ValidationMessageFor(model => model.OficinaCantidadBanos) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.OficinaCocina) %>
            </td>
            <td>
                <%:Html.CheckBoxFor(model => model.OficinaCocina) %>
                <%:Html.ValidationMessageFor(model => model.OficinaCocina) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model=>model.OficinaDetalle) %>
            </td>
            <td>
                <%:Html.TextAreaFor(model=>model.OficinaDetalle) %>
                <%:Html.ValidationMessageFor(model=>model.OficinaDetalle) %>
            </td>
        </tr>
    </table>
    <table id="tblTerreno" style="display: none">
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model=>model.TerrenoTipoTerreno) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model=>model.TerrenoTipoTerreno) %>
                <%:Html.ValidationMessageFor(model=>model.TerrenoTipoTerreno) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.TerrenoTipoTierra) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.TerrenoTipoTierra) %>
                <%:Html.ValidationMessageFor(model => model.TerrenoTipoTierra) %>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.TerrenoDetalle) %>
            </td>
            <td>
                <%:Html.TextAreaFor(model => model.TerrenoDetalle) %>
                <%:Html.ValidationMessageFor(model => model.TerrenoDetalle) %>
            </td>
        </tr>
    </table>
    <br />
    <table id="tblImages">
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.NombreImagenPortada) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.NombreImagenPortada, new { @type = "file", @style = "display:none", accept = ".jpg, .jpeg, .png" })%>
                <img id="imgNombreImagenPortada" width="60px" height="60px" style="cursor: pointer;"
                    onclick="ImagesActionPortada()" src=""/>
            </td>
        </tr>
        <tr>
            <th class="required">
                *
            </th>
            <td>
                <%:Html.LabelFor(model => model.NombreImagen2) %>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.NombreImagen2, new { @type = "file", @style = "display:none", accept = ".jpg, .jpeg, .png" })%>
                <img id="imgNombreImagen2" width="60px" height="60px" style="cursor: pointer;" onclick="Images2Action()" src="" />
                <%:Html.TextBoxFor(model => model.NombreImagen3, new { @type = "file", @style = "display:none", accept = ".jpg, .jpeg, .png" })%>
                <img id="imgNombreImagen3" width="60px" height="60px" style="cursor: pointer;" onclick="Images3Action()" src="" />
                <%:Html.TextBoxFor(model => model.NombreImagen4, new { @type = "file", @style = "display:none", accept = ".jpg, .jpeg, .png" })%>
                <img id="imgNombreImagen4" width="60px" height="60px" style="cursor: pointer;" onclick="Images4Action()" src="" />
                <%:Html.TextBoxFor(model => model.NombreImagen5, new { @type = "file", @style = "display:none", accept = ".jpg, .jpeg, .png" })%>
                <img id="imgNombreImagen5" width="60px" height="60px" style="cursor: pointer;" onclick="Images5Action()" src="" />
            </td>
        </tr>
    </table>
    <%} %>
</div>
